nums = [19,39,59,69,89,109]
n = 500
dp = [0] * (n+1)
dp[0] = 1
for num in nums:
    for j in range(num,n+1):
        dp[j] += dp[j-num]
print(sum(dp))